{{/* Return true if the page has attachments or link buttons to display. */}}

{{ $page := . }}

{{ $pdf_link := false }}
{{ $slug := $page.File.ContentBaseName }}
{{ $resource := $page.Resources.GetMatch (printf "%s.pdf" $slug) }}
{{ with $resource }}
  {{ $pdf_link = true }}
{{ end }}

{{ $cite_link := false }}
{{ $resource := $page.Resources.GetMatch "cite.bib" }}
{{ with $resource }}
  {{ $cite_link = true }}
{{ end }}

{{ return ($cite_link | or $pdf_link | or .Params.url_preprint | or .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_source | or .Params.url_code | or .Params.url_dataset | or .Params.url_poster | or .Params.url_project | or .Params.doi | or .Params.links | or .Params.projects | or .Params.slides) }}
